package com.eastmelon.blog.dao.impl;

import java.io.Serializable;

import org.springframework.stereotype.Repository;

import com.eastmelon.blog.dao.UserDao;
import com.eastmelon.blog.entity.User;

@Repository("userDao")
public class UserDaoImpl extends BaseDaoImpl<User> implements UserDao {
	public UserDaoImpl() {
		super.setNs("com.eastmelon.blog.mapper.UserMapper");
	}

	@Override
	public String getImageName(Serializable id) {
		return this.getSqlSession().selectOne(getNs() + ".getImageName", id);
	}

	@Override
	public User getUserByuserName(String username) {
		return this.getSqlSession().selectOne(getNs()+".getUserByUserName",username );
	}
	
	@Override
	public String getUserInfor(Serializable id) {
		return this.getSqlSession().selectOne(getNs()+".getUserInfor",id );
	}

}
